package com.net.flyWeight;


//- creational design pattern - singleton
//-structural design - flyweight
//-behavioral design- observer


public class FlyWeightPattern {

	public static void main(String[] args)
	{
		Order order = new Order();
		order.setCoffee(Coffee.getCoffee("Black"));
		System.out.println(order.getCoffee());
		
		order = new Order();
		order.setCoffee(Coffee.getCoffee("Black"));
		System.out.println(order.getCoffee());
		
		order = new Order();
		order.setCoffee(Coffee.getCoffee("Black1"));
		System.out.println(order.getCoffee());
		
		order = new Order();
		order.setCoffee(Coffee.getCoffee("Black1"));
		System.out.println(order.getCoffee());
		
		order = new Order();
		order.setCoffee(Coffee.getCoffee("Black2"));
		System.out.println(order.getCoffee());
		
		order = new Order();
		order.setCoffee(Coffee.getCoffee("Black2"));
		System.out.println(order.getCoffee());
		
		
		order = new Order();
		order.setCoffee(Coffee.getCoffee("Black2"));
		System.out.println(order.getCoffee());

	}

}
